package exc;

//自定义异常 通常用于那些满足语法但是不满足业务场景的错误
//自定义异常要做以下操作
//1.类名要见明知意
//2.要继承自Exception
//3.提供超类异常支持所有的构造器
//年龄不合法
public class IllegalAgeException  extends Exception{
    public IllegalAgeException() {
    }

    public IllegalAgeException(String message) {
        super(message);
    }

    public IllegalAgeException(String message, Throwable cause) {
        super(message, cause);
    }

    public IllegalAgeException(Throwable cause) {
        super(cause);
    }

    public IllegalAgeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
